package com.cys.mybatis.type;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @Author: cys
 * @description:类型处理器
 * @CreateTime: 2024-10-31  21:06
 * @Version: 1.0
 */
public interface TypeHandler<T> {
    /**
     * 设置参数
     */
    void setParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType) throws SQLException;


    /**
     * 获取结果
     */
    T getResult(ResultSet rs, String columnName) throws SQLException;
    /**
     * 取得结果
     */
    T getResult(ResultSet rs, int columnIndex) throws SQLException;
}
